package graphics.raytracing;

import graphics.datastructures.BoundingBox;

import java.io.Serializable;

public interface Tracable<T extends Tracable<? extends Tracable<?>>> extends Serializable {
	/**
	 * Returns a castresult if it hits
	 * @param ray
	 * @return
	 * null if there is no hit.
	 */
	public CastResult<T> cast(Ray ray);	/**
	 * Returns the bounding box in 2 arrays,
	 * {lbn,rtf}
	 * @return
	 */
	public float[][] getBB();
	public BoundingBox<T> getBoundingBox();
}
